package com.zsj.enums;

/**
 * @Description:
 * @Author:
 * @Date:
 */
public enum NotifyStatusEnum {

    INIT(0, "待通知"),
    SUCCESS(1, "通知成功"),
    FAILED(2, "通知失败"),
    ;

    private final Integer code;

    private final String msg;

    NotifyStatusEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }


    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }


    public static NotifyStatusEnum findByCode(Integer code) {
        for (NotifyStatusEnum notifyStatus : NotifyStatusEnum.values()) {
            if (notifyStatus.getCode().equals(code)) {
                return notifyStatus;
            }
        }
        return null;
    }
}
